#!/usr/bin/perl -w

$id = "$ARGV[0]";     # Service label id
$name = "$ARGV[1]";   # section name 
$value = "";   # initializing value

open($file, "<", "ServiceComment.txt") or die(exit(4));

while ($line = <$file>) {   # checks all lines in file

        if($line =~ 
	/^\s*$id\s*=\s*
	(([+|-]?\d+(\.\d)?)|
	\"(.+)\"|
	\'(.+)\')
	\s*(\#.*)?$/x) 
	{
			if($2) { $value = $2; }
			if($4) { $value = $4; }
			if($5) { $value = $5; }
	}
}

if ($value) {
$value =~ s/\<br\/\>/\n/g;   # replaces all <br/> with \n
print $value."\n";
}
else { print "ErrorCode626"; }

close $file;

exit(5);
